﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Globalization;

namespace IDE_week2_Forms_project
{
    public partial class Form1 : Form
    {
       
        public Form1()
        {
            InitializeComponent();
        }

        private void ChangeLanguage(string lang)
        {
            foreach (Control c in this.Controls)
            {
                ComponentResourceManager resources =
                      new ComponentResourceManager(typeof(Form1));
                resources.ApplyResources(c, c.Name, new CultureInfo(lang));
            }
        }

        private void label1_Click(object sender, EventArgs e)
        {

        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form2 newForm = new Form2();
            newForm.Show();
        }

        private void buttonChange_Click(object sender, EventArgs e)
        {
            System.Drawing.Icon ICON1 = Properties.Resources.ICON1;
                this.Icon= ICON1;
        }

        private void buttonReset_Click(object sender, EventArgs e)
        {
            this.Icon = default(Icon);
        }

        private void LanguageChange_Click(object sender, EventArgs e)
        {
            if (LanguageChange.Text == "veranderen taal")
            {
                ChangeLanguage("en-US");
            }
            else 
            {
                ChangeLanguage("nl-NL");
            }
        }

        private void CallCls_Click(object sender, EventArgs e)
        {
            int[] numbers = new int[10];
            Class1.MakeRandomNumber(numbers);
            label1.Text = numbers[0] + ", " + numbers[1] + ", " + numbers[2];
        }
    }
}
